<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>打印金字塔</title>
<style>
    .box{background-color:#000;margin:3px;padding:2px;font-size:24px;font-weight:bold;color:#FFFF00;}
    .out{border:solid 3px #000 float:left;overflow:hidden;}
    </style>
</head>
<body>
<div class="out">
    <div class="box"></body></html>
 <?php
$line=1;
while($line<=5){
    $empty_pos=$star_pos=1;
    $empty=5-$line;
    $star=2*$line-1;
    while($empty_pos<=$empty){
        echo'&nbsp;';
    ++$empty_pos;
    }
    while($empty_pos<=$star){
        echo'*';
        ++$star_pos;

    }
    echo'<br>';
    ++$line





